package com.shiguiwu.springmybatis.designpattern.dutychain.service;

import java.util.Date;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @description: 审批审核流程
 * @author: stone
 * @date: Created by 2021/9/1 17:15
 * @version: 1.0.0
 * @pakeage: com.shiguiwu.springmybatis.designpattern.dutychain.service
 */
public class AuthService {
    private static Map<String, Date> authMap = new ConcurrentHashMap<>();

    public static Date queryAuthInfo(String userId, String orderId) {
        return authMap.get(userId.concat(orderId));
    }


    public static void auth(String userId, String orderId) {
        authMap.put(userId.concat(orderId), new Date());
    }

}
